package com.lixinlei.springboot_servlet.filter.filterRegistrationbean;

import javax.servlet.*;
import javax.servlet.http.HttpServletRequest;
import java.io.IOException;

public class RegisterFilter implements Filter {

    @Override
    public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
            throws IOException, ServletException {
        HttpServletRequest httpRequest = (HttpServletRequest) request;
        System.out.println("自定义过滤器 RegisterFilter 触发, 拦截 URL:" + httpRequest.getRequestURI());
        chain.doFilter(request, response);
    }

}
